package kit.msc.gui;

import java.awt.Color;

import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.border.Border;

import kit.msc.data.Table;
import kit.msc.utility.Preference;

public class TablePanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Table table;

	public TablePanel() {

		Border compound;
		Border lineBorder = BorderFactory.createMatteBorder(3, 3, 3, 3, Color.black);
		Border emptyBorder = BorderFactory.createEmptyBorder(5, 5, 5, 5);
		compound = BorderFactory.createCompoundBorder(emptyBorder, lineBorder);

		this.setBorder(compound);
		this.setBackground(Color.white);

		int tableHeight = Preference.getInt("tableCellHeight", 7);
		int tableWidth = Preference.getInt("tableCellWidth", 6);

		table = new Table(tableWidth, tableHeight);

		this.add(table);

	}

}
